package com.abel.demo.domain;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import java.util.ArrayList;
import java.util.List;

import com.abel.demo.model.SecRoleModel;

/**
* @author abel.lin
* @date_time 2018-07-13 18:08
* @description
*/
public class SecRoleDomain extends SecRoleModel {

    public static SecRoleDomain genDomain(SecRoleModel model){
        if(model == null){
            model = new SecRoleModel();
        }
        SecRoleDomain domain = JSON.parseObject(JSON.toJSONString(model), SecRoleDomain.class);
        return domain;
    }

    public static List<SecRoleDomain> genDomainList(List<SecRoleModel> modelList){
        if(modelList == null){
            modelList = new ArrayList<SecRoleModel>();
        }
        List<SecRoleDomain> domainList = JSONArray.parseArray(JSONArray.toJSONString(modelList), SecRoleDomain.class);
        return domainList;
    }

}
